package com.xiaolin.structure.array.one;

import java.util.Arrays;

/**
 * @ClassName SimpleTest
 * @Description 一维数组简单测试
 * @Detail detail
 * @Author MyPC
 * @Date 2020/11/2
 * @Version 1.0
 */
public class SimpleTest {
    public static void main(String[] args) {
        int[] array=new int[20];
        System.out.println(Arrays.toString(array));
        //数组长度
        System.out.println(array.length);
        //普通for循环
        for(int i=0;i<array.length;i++){
            array[i]=i;
        }
        //增强for循环
        for (int i : array) {
            System.out.println(i);
        }
        System.out.println(Arrays.toString(array));
        System.out.println(array.length);
    }
}
